<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="UTF-8">
	<title>window</title>
</head>

<body>
	<div onclick="stop()">停止</div>
	<script type="text/javascript">

   		 interval = function () {
   			sole.log(new Date() + "函数中的方法执行了");
   		  		 x = setInterval(interval, 1000);
   		ction stop() {
   			arInterval(x);
        }
	</script>

</body>

</html>